package com.mryang.hds.utils;

import lombok.Getter;

/**
 * @author Genius
 * @version 1.0.0
 * @ClassName ResultCode.java
 * @Description TODO 统一 异常信息枚举类
 * @createTime 2022年12月25日 19:27:00
 */
@Getter
public enum ResultCode {
    SUCCESS(200,"请求成功"),
    LOGIN_FAIL(201,"登录相关操作失败"),
    ERROR(500,"请求失败"),
    NOAUTH(202,"用户未登录或登录超时"),
    USER_CREDIT_NOT_ENOUTH(10002,"用户查找失败"),
    USER_ADDITION_FAILED(10003,"添加失败"),
    USER_EditITION_FAILED(10010,"修改失败"),
    UPLOAD_OPERATION_FAILED(10004,"图片上传失败！"),
    TRIP_INFO_EXCEPTION(10005,"行程信息处理失败"),
    SUBJECT_FAIL(10006,"题目相关操作失败"),
    PUNCH_FAIL(10007,"打卡相关操作失败"),
    CHART_FAIL(10008,"图表相关操作失败"),
    MANAGE_USER_FAIL(10009,"用户管理操作失败"),
    PUNCH_PAST__FAIL(10011,"打卡管理操作失败"),
    NEED_FAIL(10012,"需求处理失败"),
    Notify_FAIL(10013,"消息处理失败"),
    RECOVERED_FAIL(10014,"解除隔离相关操作失败"),
    USERADD_FAIL(10015,"该用户已存在，请检查后添加！"),

    NOPERMISSION(403,"无此操作权限");

    private Integer code;
    private String message;


    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
